package com.ly.erms.core.exception;

/**
 * 封装erms的异常
 * @author liuyang
 * @date 2018年1月8日
 */
public class ErmsException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1414562951400653743L;

    private Integer code;

    private String message;
    
	public ErmsException(ServiceExceptionEnum serviceExceptionEnum) {
        this.code = serviceExceptionEnum.getCode();
        this.message = serviceExceptionEnum.getMessage();
    }

	public Integer getCode() {
        return code;
    }

	public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
